package com.aurora.app.service;

import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.aurora.app.dao.HelpDao;
import com.aurora.app.entity.Help;
import com.aurora.app.enums.FakeDelete;
import com.aurora.app.enums.HelpCategory;
import com.aurora.base.dao.BaseDao;
import com.aurora.base.service.BaseService;
@Service
public class HelpService extends BaseService<Help> {

	@Resource
	private HelpDao baseDao;
	@Override
	public BaseDao<Help> getBaseDao() {
		// TODO 自动生成的方法存根
		return this.baseDao;
	}
	
	/**
	 * 根据类型获取棒棒列表
	 * @param helpCategory
	 * @return
	 */
	@Transactional
	public List<Help> getHelpListByCategory(int firstResult,int maxResult,HelpCategory helpCategory){
		return this.baseDao.list(firstResult, firstResult, "o.isDelete = ?  and o.helpCategory = ? ", FakeDelete.NODELETE,helpCategory);
	}
	
	

}
